/**
 * 右侧固定浮动栏
 * @class Advisory
 * @extends Basic
 * @author 杜慧玲
 *
 * 示例：
 *
 *     @example
 *     <Advisory>
 *         <a href="http://baidu.com">123</a>
 *     </Advisory>
 */
var Advisory = React.createClass({
    _show:function(){
        var _show = this.refs.show,
            _close = this.refs.close,
            _wrap = this.refs.advisory;
        _show.style.display = "none";
        _close.style.display = "block";
        _wrap.style.right = "0";
    },
    _close:function(){
        var _show = this.refs.show,
            _close = this.refs.close,
            _wrap = this.refs.advisory;
        _show.style.display = "block";
        _close.style.display = "none";
        _wrap.style.right = "-80px";
    },
    render:function(){
        return(
            <div ref="advisory" className="ucs-advisory">
                <a className="ucs-close_kf iconfont icon-arrow-right" ref="close" href="javascript:void(0)" onClick={this._close.bind(this)}></a>
                <a className="ucs-show_kf iconfont icon-arrow-left" ref="show" href="javascript:void(0)" onClick={this._show.bind(this)}></a>
                <div className="ucs-ui-tools">
                    {this.props.children}
                </div>
            </div>
        )
    }
});
module.exports = Advisory;